package 文件输入输出;


import java.io.Serializable;

public class Student extends People implements Serializable {
	 /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	public Student(){
	    }
	 	public Student(String a,String b,String c,Course[] d){
	    number=a;
	    name=b;
	    sex=c;
	    course=d;
	    }
	    public String toString(){
	        return "学生编号:"+number+
	                "\n学生姓名:"+name+
	                "\n学生性别:"+sex;
	    }
	    //选课
	    void xuanke(Course t) {
	    	for(int i=0;i<this.course.length;i++){
	    		if (course[i]==null) {
	    		course[i]=t;
	    		break;
	    		}
	    	}
	    }
}